home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / www / amitrix / german3b.lha / docs / _starttcpscript < prev    next >
Text File  |  1996-10-31  |  1KB  |  50 lines

  1. ; Sample script to start a TCP program that does not return when
  2. ; the session is active.
  3. ;
  4. ; Note that this is the first part, you will have to change the
  5. ; file _starttcpscript2 too.
  6. ;
  7. ; To use this script, configure AWeb to use for its Start TCP program:
  8. ;    command = (path)/_starttcpscript
  9. ;  arguments = (none)
  10. ;
  11. ; Make sure to change the path name for _starttcpscript2 below to the one
  12. ; you're actually using.
  13. ; =======================================================================
  14.  
  15. .key DUMMY/K ; so we can use <$$>
  16. FailAt 10
  17.  
  18. ; Set variable to our process number so the _starttcpscript2 script
  19. ; can break us if the connection fails
  20.  
  21. SetEnv STARTTCPPROCESS <$$>
  22.  
  23. ; Start the TCP stack in a separate CLI
  24. ;
  25. ; ***********************************************************************
  26. ; *** Change the path in the next line to the actual path where 
  27. ; *** _starttcpscript2 can be found:
  28.  
  29. Run Execute AWeb-II:docs/_starttcpscript2
  30.  
  31. ; ***********************************************************************
  32.  
  33. ; Wait until the tcp library is present.
  34.  
  35. FailAt 30
  36. Lab WaitForLib
  37.  
  38. Wait 2
  39.  
  40. Version >NIL: "bsdsocket.library"
  41.  
  42. If WARN
  43.   Skip Back WaitForLib
  44. EndIf
  45.  
  46. ; Unset the variable holding our process number so if the TCP program
  47. ; fails after some time the second script won't break some innocent process
  48.  
  49. UnSetEnv STARTTCPPROCESS
  50.